package com.example.demo.Dao;

import com.example.demo.Entity.OrderList;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Property;

import java.awt.*;
import java.util.ArrayList;

@Mapper
public interface OrderDao {
    public int countUserOrderById(String uid);

    public OrderList selectOrderByOid(long OrderId);

    public boolean createOrder(OrderList order);

    public ArrayList<OrderList> selectOrderByUid(String uid);

    public int noPayOrder(String UserId);

    public void editOrderRemark(@Param("OrderId") long OrderId, @Param("Remark") String Remark);
    public void editOrderNumber(@Param("OrderId") long OrderId, @Param("Number") int Number);
    public void editOrderAddress(@Param("OrderId") long OrderId, @Param("Address") String Address);
    public void updatePrice(@Param("OrderId")long OrderId, @Param("Number") int Number, @Param("Price") float Price);

    public boolean cancelOrder(long OrderId);

    public boolean confirmOrder(long OrderId);

    public void  payOrder(long OrderId);

    public OrderList selectNewestOrder();
}
